﻿-- suppression des Roles ManageRoles et ManageResources.
-- Ces pages deviennent SA seulement

Update Medianamik_PageInRole 
SET RoleId = '510D8709-41DD-423F-A576-17C4869A70B6' /*ManageMEdianamik*/
WHERE RoleID = 'E9B295C9-C0CA-4B39-8785-5A3B06BDC4A3' /*ManageRoles*/
OR RoleId = 'BF8657D7-497F-4877-B115-ADB94FBD2A0F' /*ManageResources*/

Delete From MEdianamik_RoleInGroup
Where RoleId = 'E9B295C9-C0CA-4B39-8785-5A3B06BDC4A3' /*ManageRoles*/
OR RoleId='BF8657D7-497F-4877-B115-ADB94FBD2A0F' /*ManageResources*/

Delete From MEdianamik_Role 
Where RoleId = 'E9B295C9-C0CA-4B39-8785-5A3B06BDC4A3' /*ManageRoles*/
OR RoleId='BF8657D7-497F-4877-B115-ADB94FBD2A0F' /*ManageResources*/


-- Ajout de la propriété WebSite au MedianamikTemplate
IF NOT EXISTS (SELECT NULL FROM dbo.medianamik_property
    WHERE [PropertyId] = 'a679ce08-2556-46c4-934f-4612fb31d8ad')
    BEGIN
		INSERT INTO [dbo].[medianamik_Property]([PropertyId],
 		[TypeId], 
		[Name], 
		[HaveTooltip], 
		[IsLanguageNeutral], 
		[IsRequired],
		[IsUnique], 
		[ValidationRegex], 
		[GroupName], 
		[Flags], 
		[MedianamikControlId], 
		[MedianamikControlWidth], 
		[MedianamikControlHeight], 
		[Position], 
		[PrimaryPropertyId], 
		[PrimaryTypeId], 
		[PrimaryMedianamikControlId], 
    	[PrimaryMedianamikControlWidth], 
		[PrimaryMedianamikControlHeight], 
		[Roles], 
		[MaxLength], 
		[MinLength], 
		[DataTypeId], 
		[PrimaryDataTypeId], 
		[Description], 
    	[TreeRootNodeId], 
		[PrimaryTreeRootNodeId])
		VALUES ('a679ce08-2556-46c4-934f-4612fb31d8ad', 
		'3f22f613-83fe-4f19-af04-6f1b0615b971', 
		'WebSite', 
		0, 
		1, 
		1, 
		0, 
		NULL, 
		'Content', 
		0, 
		'59b66d0c-8bff-4802-b83a-977e11797677', 
		300, 
		NULL, 
		0, 
		'35a3f17a-a4c8-4331-9e8f-10fc27c18445', 
		'44eb974b-6871-4879-a0c9-c596b42ff945', 
		NULL, 
		NULL, 
		NULL,
		'' ,
		NULL, 
		NULL, 
		'0d5b7a19-a12a-46b5-9a2c-8d15093f5666', 
		'0d5b7a19-a12a-46b5-9a2c-8d15093f5666', 
		'Site auquel appartient un gabarit.', 
		'f091e77f-76db-421b-87ab-8ad4c2155175', 
		NULL)
	END
